package com.mcarrot.site.dao;

import java.util.List;

import com.mcarrot.site.common.Constants;
import com.mcarrot.site.model.Affair;

public interface AffairDAO extends Constants{
	Long saveOrUpdate(Affair affair);
	Long del(Affair affair);
	Affair findById(Integer affairId);
	List<Affair> listAll();
	List<Affair> listAllByKey(String key);
	List<Affair> listAllByStartDate(String key, String startDate);
	List<Affair> listAllByEndDate(String key, String endDate);
	List<Affair> listAllByConditions(String key, String startDate, String endDate);
	List<Affair> list(Integer start, Integer limit);
	List<Affair> listByKey(String key, Integer start, Integer limit);
	List<Affair> listByStartDate(String startDate, Integer start, Integer limit);
	List<Affair> listByEndDate(String endDate, Integer start, Integer limit);
	List<Affair> listByKeyAndStartDate(String key, String startDate, Integer start, Integer limit);
	List<Affair> listByKeyAndEndDate(String key, String endDate, Integer start, Integer limit);
	List<Affair> listByConditions(String key, String startDate, String endDate, Integer start, Integer limit);
	Integer getCount();
	Integer getCountByKey(String key);
	Integer getCountByStartDate(String startDate);
	Integer getCountByEndDate(String endDate);
	Integer getCountByDate(String startDate, String endDate);
	Integer getCountByKeyAndStartDate(String key, String startDate);
	Integer getCountByKeyAndEndDate(String key, String endDate);
	Integer getCountByConditions(String key, String startDate, String endDate);
}
